package sandbox.vaadin.clicker;

import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;

@SuppressWarnings("serial")
public class Clicker extends VerticalLayout
{
	public Clicker()
  {
		super();
		
		setMargin(true);

		Button button = new Button("Click Me");
		button.addClickListener(new Button.ClickListener()
		{
			public void buttonClick(ClickEvent event)
			{
				addComponent(new Label("Thank you for clicking"));
			}
		});
		
		addComponent(button);
  }
}